package com.itany.shop.service;

import com.itany.shop.entity.User;
import com.itany.shop.exception.CodeErrorException;
import com.itany.shop.exception.RequestParameterErrorException;
import com.itany.shop.exception.UserExistException;
import com.itany.shop.exception.UserNotExistException;

/**
 * @author 石小俊
 * @date 2023年10月25日 13:50
 */
public interface UserService {

    /**
     * 用户注册
     * @param username  用户名,不能重复
     * @param password
     * @param phone
     * @param address
     */
    void register(String username,String password,String phone,String address) throws RequestParameterErrorException, UserExistException;

    /**
     * 用户登录
     * @param username
     * @param password
     * @param code
     * @param image
     * @return
     */
    User login(String username,String password,String code,String image) throws RequestParameterErrorException, CodeErrorException, UserNotExistException;
}
